﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class my_ascx_recommend : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        int cno=int.Parse(Request["cno"]);
        int no=int.Parse(Request["no"]);


        ctpDataContext db = new ctpDataContext();
        var data = from p in db.ct_s_reviews
                   join q in db.ct_s_profiles on p.ct_s_no equals q.no
                   where p.create_user_no == no && p.ct_no == cno && q.valid==true
                   orderby p.addtime descending
                   select new
                   {
                       q.title,
                       main_pic_fn=q.main_pic_fn.Trim(),
                       tourl="../../city_s.aspx?no="+q.no.ToString(),
                       p.ranking,
                       p.comment

                   };

        this.DataList5.DataSource = data;
        this.DataBind();

    }
}
